require(['config'],function(){
    require(['jquery','jquery.cookie'],function($){
        console.log($);
       $('button').on('click',function(e){
            e.preventDefault()
            $.ajax({
                type: "POST",
                url: "../php/login.php",
                data: {
                    username:$('.item_account').eq(0).val(),
                    password:$('.item_account').eq(1).val()
                },
                success: function(result){
                    var obj = JSON.parse(result);
                    console.log(obj)
                    if(obj.code){
                        alert(obj.message)
                    }
                },
                error: function(msg){
                    console.log(msg);
                }

            })
       })
    })
})